home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-2.iso / Files II / Prog / T / ThinkHelper 1.0b1.sit / ThinkHelper 1.0b1 / Source (!) / Source / PUFInterface.c < prev    next >
MacBinary  |  1993-08-18  |  10.3 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: PUFInterface.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Wed Aug 18 15:50:14 1993, modified Wed Aug 18 15:50:14 1993, creator Think C, type ASCII, 9856 bytes "PUFInterface.c" , at 0x2700 402 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 50 55 46 49 6e 74 | 65 72 66 61 63 65 2e 63 |..PUFInt|erface.c|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 26 80 00 | 00 01 92 a8 98 38 76 a8 |.....&..|.....8v.|
|00000060| 98 38 76 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.8v.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 5a 9b 00 00 |........|....Z...|
|00000080| 2f 2a 0d 09 50 55 46 49 | 6e 74 65 72 66 61 63 65 |/*..PUFI|nterface|
|00000090| 2e 63 0d 09 0d 09 61 6e | 20 69 6e 74 65 72 66 61 |.c....an| interfa|
|000000a0| 63 65 20 74 6f 20 54 48 | 43 73 20 50 55 46 20 69 |ce to TH|Cs PUF i|
|000000b0| 6e 74 65 72 66 61 63 65 | 20 73 74 75 66 66 0d 09 |nterface| stuff..|
|000000c0| 0d 09 a9 20 31 39 39 33 | 20 53 74 65 76 65 20 5a |... 1993| Steve Z|
|000000d0| 65 6c 6c 65 72 73 0d 0d | 09 3c 72 65 76 69 73 69 |ellers..|.<revisi|
|000000e0| 6f 6e 20 68 69 73 74 6f | 72 79 3e 0d 09 30 35 2f |on histo|ry>..05/|
|000000f0| 31 36 2f 39 33 20 20 73 | 6d 7a 20 20 63 72 65 61 |16/93 s|mz crea|
|00000100| 74 65 64 0d 09 30 35 2f | 32 30 2f 39 33 20 20 73 |ted..05/|20/93 s|
|00000110| 6d 7a 20 20 67 65 6e 65 | 72 61 6c 69 7a 65 64 20 |mz gene|ralized |
|00000120| 64 69 73 70 61 74 63 68 | 65 73 0d 09 30 36 2f 30 |dispatch|es..06/0|
|00000130| 36 2f 39 33 20 20 73 6d | 7a 20 20 61 64 64 65 64 |6/93 sm|z added|
|00000140| 20 4d 6f 76 65 57 69 6e | 64 6f 77 20 63 6f 64 65 | MoveWin|dow code|
|00000150| 20 2f 20 53 65 74 50 6f | 72 74 20 63 61 6c 6c 73 | / SetPo|rt calls|
|00000160| 0d 09 30 36 2f 32 39 2f | 39 33 20 20 73 6d 7a 20 |..06/29/|93 smz |
|00000170| 20 70 61 74 63 68 65 73 | 20 66 6f 72 20 6d 65 6e | patches| for men|
|00000180| 75 73 2c 20 62 65 74 74 | 65 72 20 4d 6f 76 65 57 |us, bett|er MoveW|
|00000190| 69 6e 64 6f 77 0d 09 30 | 38 2f 31 38 2f 39 33 20 |indow..0|8/18/93 |
|000001a0| 20 73 6d 7a 20 20 73 61 | 76 65 2f 72 65 73 74 6f | smz sa|ve/resto|
|000001b0| 72 65 20 63 6c 69 70 62 | 6f 61 72 64 2c 20 72 65 |re clipb|oard, re|
|000001c0| 6d 6f 76 65 64 20 43 6c | 6f 73 65 46 72 6f 6e 74 |moved Cl|oseFront|
|000001d0| 6d 6f 73 74 20 28 75 73 | 65 20 6d 65 6e 75 73 29 |most (us|e menus)|
|000001e0| 2c 20 66 69 72 73 74 20 | 62 65 74 61 20 72 65 6c |, first |beta rel|
|000001f0| 65 61 73 65 0d 2a 2f 0d | 0d 23 69 6e 63 6c 75 64 |ease.*/.|.#includ|
|00000200| 65 20 3c 45 72 72 6f 72 | 73 2e 68 3e 0d 23 69 6e |e <Error|s.h>.#in|
|00000210| 63 6c 75 64 65 20 3c 50 | 72 6f 63 65 73 73 65 73 |clude <P|rocesses|
|00000220| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 22 50 55 |.h>.#inc|lude "PU|
|00000230| 46 49 6e 74 65 72 66 61 | 63 65 2e 68 22 0d 23 69 |FInterfa|ce.h".#i|
|00000240| 6e 63 6c 75 64 65 20 22 | 45 78 63 65 70 74 69 6f |nclude "|Exceptio|
|00000250| 6e 73 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |ns.h".#i|nclude "|
|00000260| 73 74 72 63 61 73 65 63 | 6d 70 2e 68 22 0d 23 69 |strcasec|mp.h".#i|
|00000270| 6e 63 6c 75 64 65 20 22 | 4c 69 73 74 54 6f 6f 6c |nclude "|ListTool|
|00000280| 73 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 4d |s.h".#in|clude "M|
|00000290| 65 6e 75 73 4c 69 73 74 | 2e 68 22 0d 23 69 6e 63 |enusList|.h".#inc|
|000002a0| 6c 75 64 65 20 22 50 55 | 46 50 61 74 63 68 65 73 |lude "PU|FPatches|
|000002b0| 2e 68 22 0d 0d 2f 2f 20 | 74 68 65 20 66 6f 72 6d |.h"..// |the form|
|000002c0| 61 74 20 6f 66 20 61 20 | 27 50 55 46 20 27 20 72 |at of a |'PUF ' r|
|000002d0| 65 73 6f 75 72 63 65 0d | 74 79 70 65 64 65 66 20 |esource.|typedef |
|000002e0| 73 74 72 75 63 74 20 7b | 0d 09 73 68 6f 72 74 09 |struct {|..short.|
|000002f0| 09 76 65 72 73 69 6f 6e | 3b 09 09 09 09 20 2f 2f |.version|;.... //|
|00000300| 20 63 75 72 72 65 6e 74 | 6c 79 20 30 78 30 30 30 | current|ly 0x000|
|00000310| 31 0d 09 50 72 6f 63 50 | 74 72 09 09 70 72 6f 63 |1..ProcP|tr..proc|
|00000320| 73 5b 5d 3b 0d 7d 20 2a | 50 55 46 43 6f 64 65 50 |s[];.} *|PUFCodeP|
|00000330| 74 72 3b 0d 0d 74 79 70 | 65 64 65 66 20 73 74 72 |tr;..typ|edef str|
|00000340| 75 63 74 20 7b 0d 09 6c | 6f 6e 67 09 09 09 73 69 |uct {..l|ong...si|
|00000350| 67 6e 61 74 75 72 65 3b | 09 09 09 2f 2f 20 4b 41 |gnature;|...// KA|
|00000360| 48 4c 0d 09 50 55 46 43 | 6f 64 65 50 74 72 09 09 |HL..PUFC|odePtr..|
|00000370| 63 6f 64 65 3b 0d 09 48 | 61 6e 64 6c 65 2a 09 09 |code;..H|andle*..|
|00000380| 09 73 63 72 61 70 48 61 | 6e 64 6c 65 41 64 64 72 |.scrapHa|ndleAddr|
|00000390| 3b 0d 09 50 74 72 09 09 | 09 09 73 65 61 72 63 68 |;..Ptr..|..search|
|000003a0| 53 74 72 41 64 64 72 3b | 09 09 09 2f 2f 20 70 74 |StrAddr;|...// pt|
|000003b0| 72 20 74 6f 20 73 65 61 | 72 63 68 20 73 74 72 69 |r to sea|rch stri|
|000003c0| 6e 67 0d 09 50 74 72 09 | 09 09 09 72 65 70 6c 61 |ng..Ptr.|...repla|
|000003d0| 63 65 53 74 72 41 64 64 | 72 3b 09 09 09 2f 2f 20 |ceStrAdd|r;...// |
|000003e0| 70 74 72 20 74 6f 20 72 | 65 70 6c 61 63 65 20 73 |ptr to r|eplace s|
|000003f0| 74 72 69 6e 67 0d 7d 20 | 2a 2a 50 55 46 52 65 73 |tring.} |**PUFRes|
|00000400| 6f 75 72 63 65 48 61 6e | 64 6c 65 3b 0d 0d 2f 2f |ourceHan|dle;..//|
|00000410| 20 63 6f 64 65 73 20 66 | 6f 72 20 74 68 65 20 70 | codes f|or the p|
|00000420| 72 6f 63 73 20 61 62 6f | 76 65 0d 65 6e 75 6d 20 |rocs abo|ve.enum |
|00000430| 7b 0d 09 65 47 65 74 57 | 69 6e 64 6f 77 54 65 78 |{..eGetW|indowTex|
|00000440| 74 2c 0d 09 65 47 65 74 | 53 65 6c 65 63 74 69 6f |t,..eGet|Selectio|
|00000450| 6e 2c 0d 09 65 53 65 74 | 53 65 6c 65 63 74 69 6f |n,..eSet|Selectio|
|00000460| 6e 2c 0d 0d 09 65 47 65 | 74 44 6f 63 49 6e 66 6f |n,...eGe|tDocInfo|
|00000470| 2c 0d 09 65 47 65 74 4d | 6f 64 44 61 74 65 2c 0d |,..eGetM|odDate,.|
|00000480| 0d 09 65 43 6f 70 79 53 | 65 6c 65 63 74 69 6f 6e |..eCopyS|election|
|00000490| 2c 0d 09 65 52 65 70 6c | 61 63 65 53 65 6c 65 63 |,..eRepl|aceSelec|
|000004a0| 74 69 6f 6e 2c 0d 0d 09 | 65 46 69 6e 61 6c 56 65 |tion,...|eFinalVe|
|000004b0| 63 74 6f 72 0d 7d 3b 0d | 0d 2f 2f 20 74 79 70 65 |ctor.};.|.// type|
|000004c0| 64 65 66 73 20 66 6f 72 | 20 74 68 65 20 70 61 72 |defs for| the par|
|000004d0| 61 6d 65 74 65 72 73 20 | 74 6f 20 74 68 65 20 70 |ameters |to the p|
|000004e0| 72 6f 63 73 0d 74 79 70 | 65 64 65 66 20 70 61 73 |rocs.typ|edef pas|
|000004f0| 63 61 6c 20 48 61 6e 64 | 6c 65 20 28 2a 50 47 65 |cal Hand|le (*PGe|
|00000500| 74 54 65 78 74 29 28 57 | 69 6e 64 6f 77 50 74 72 |tText)(W|indowPtr|
|00000510| 20 77 69 6e 29 3b 0d 74 | 79 70 65 64 65 66 20 70 | win);.t|ypedef p|
|00000520| 61 73 63 61 6c 20 48 61 | 6e 64 6c 65 20 28 2a 50 |ascal Ha|ndle (*P|
|00000530| 43 6f 70 79 53 65 6c 65 | 63 74 69 6f 6e 29 28 76 |CopySele|ction)(v|
|00000540| 6f 69 64 29 3b 0d 74 79 | 70 65 64 65 66 20 70 61 |oid);.ty|pedef pa|
|00000550| 73 63 61 6c 20 76 6f 69 | 64 20 28 2a 50 47 65 74 |scal voi|d (*PGet|
|00000560| 53 65 6c 65 63 74 69 6f | 6e 29 28 6c 6f 6e 67 2a |Selectio|n)(long*|
|00000570| 20 73 65 6c 53 74 61 72 | 74 2c 20 6c 6f 6e 67 2a | selStar|t, long*|
|00000580| 20 73 65 6c 45 6e 64 2c | 20 6c 6f 6e 67 2a 20 66 | selEnd,| long* f|
|00000590| 69 72 73 74 43 68 61 72 | 29 3b 0d 74 79 70 65 64 |irstChar|);.typed|
|000005a0| 65 66 20 70 61 73 63 61 | 6c 20 76 6f 69 64 20 28 |ef pasca|l void (|
|000005b0| 2a 50 53 65 74 53 65 6c | 65 63 74 69 6f 6e 29 28 |*PSetSel|ection)(|
|000005c0| 6c 6f 6e 67 20 73 65 6c | 53 74 61 72 74 2c 20 6c |long sel|Start, l|
|000005d0| 6f 6e 67 20 73 65 6c 45 | 6e 64 2c 20 6c 6f 6e 67 |ong selE|nd, long|
|000005e0| 20 66 69 72 73 74 43 68 | 61 72 29 3b 0d 74 79 70 | firstCh|ar);.typ|
|000005f0| 65 64 65 66 20 70 61 73 | 63 61 6c 20 76 6f 69 64 |edef pas|cal void|
|00000600| 20 28 2a 50 47 65 74 44 | 6f 63 49 6e 66 6f 29 28 | (*PGetD|ocInfo)(|
|00000610| 57 69 6e 64 6f 77 50 74 | 72 20 77 2c 20 53 74 72 |WindowPt|r w, Str|
|00000620| 69 6e 67 50 74 72 20 6e | 61 6d 65 2c 20 73 68 6f |ingPtr n|ame, sho|
|00000630| 72 74 2a 20 76 52 65 66 | 4e 75 6d 2c 20 6c 6f 6e |rt* vRef|Num, lon|
|00000640| 67 2a 20 64 69 72 49 44 | 29 3b 0d 74 79 70 65 64 |g* dirID|);.typed|
|00000650| 65 66 20 70 61 73 63 61 | 6c 20 6c 6f 6e 67 20 28 |ef pasca|l long (|
|00000660| 2a 50 47 65 74 4d 6f 64 | 44 61 74 65 50 72 6f 63 |*PGetMod|DateProc|
|00000670| 50 74 72 29 28 57 69 6e | 64 6f 77 50 74 72 20 77 |Ptr)(Win|dowPtr w|
|00000680| 29 3b 0d 74 79 70 65 64 | 65 66 20 70 61 73 63 61 |);.typed|ef pasca|
|00000690| 6c 20 76 6f 69 64 20 28 | 2a 50 50 61 73 74 65 54 |l void (|*PPasteT|
|000006a0| 65 78 74 29 28 48 61 6e | 64 6c 65 20 68 54 65 78 |ext)(Han|dle hTex|
|000006b0| 74 29 3b 0d 0d 73 74 61 | 74 69 63 20 48 61 6e 64 |t);..sta|tic Hand|
|000006c0| 6c 65 20 47 65 74 50 55 | 46 53 63 72 61 70 28 29 |le GetPU|FScrap()|
|000006d0| 0d 7b 0d 09 72 65 67 69 | 73 74 65 72 20 50 55 46 |.{..regi|ster PUF|
|000006e0| 52 65 73 6f 75 72 63 65 | 48 61 6e 64 6c 65 20 68 |Resource|Handle h|
|000006f0| 3b 0d 09 57 69 6e 64 6f | 77 50 74 72 20 77 69 6e |;..Windo|wPtr win|
|00000700| 3b 0d 0d 09 68 20 3d 20 | 28 50 55 46 52 65 73 6f |;...h = |(PUFReso|
|00000710| 75 72 63 65 48 61 6e 64 | 6c 65 29 20 47 65 74 52 |urceHand|le) GetR|
|00000720| 65 73 6f 75 72 63 65 28 | 27 50 55 46 20 27 2c 20 |esource(|'PUF ', |
|00000730| 31 32 38 29 3b 0d 0d 09 | 69 66 20 28 68 20 3d 3d |128);...|if (h ==|
|00000740| 20 6e 69 6c 29 0d 09 09 | 74 68 72 6f 77 28 72 65 | nil)...|throw(re|
|00000750| 73 4e 6f 74 46 6f 75 6e | 64 29 3b 0d 09 0d 09 72 |sNotFoun|d);....r|
|00000760| 65 74 75 72 6e 20 2a 28 | 2a 2a 68 29 2e 73 63 72 |eturn *(|**h).scr|
|00000770| 61 70 48 61 6e 64 6c 65 | 41 64 64 72 3b 0d 7d 0d |apHandle|Addr;.}.|
|00000780| 0d 73 74 61 74 69 63 20 | 50 72 6f 63 50 74 72 20 |.static |ProcPtr |
|00000790| 47 65 74 50 55 46 56 65 | 63 74 6f 72 28 73 68 6f |GetPUFVe|ctor(sho|
|000007a0| 72 74 20 76 65 63 74 6f | 72 29 0d 7b 0d 09 72 65 |rt vecto|r).{..re|
|000007b0| 67 69 73 74 65 72 20 50 | 55 46 52 65 73 6f 75 72 |gister P|UFResour|
|000007c0| 63 65 48 61 6e 64 6c 65 | 20 68 3b 0d 09 57 69 6e |ceHandle| h;..Win|
|000007d0| 64 6f 77 50 74 72 20 77 | 69 6e 3b 0d 0d 09 2f 2f |dowPtr w|in;...//|
|000007e0| 20 76 65 63 74 6f 72 20 | 69 6e 20 72 61 6e 67 65 | vector |in range|
|000007f0| 3f 09 0d 09 69 66 20 28 | 76 65 63 74 6f 72 20 3e |?...if (|vector >|
|00000800| 3d 20 65 46 69 6e 61 6c | 56 65 63 74 6f 72 29 0d |= eFinal|Vector).|
|00000810| 09 09 74 68 72 6f 77 28 | 63 6f 72 45 72 72 29 3b |..throw(|corErr);|
|00000820| 0d 09 0d 09 2f 2f 20 69 | 73 20 74 68 69 73 20 77 |....// i|s this w|
|00000830| 69 6e 64 6f 77 20 76 61 | 6c 69 64 3f 0d 09 77 69 |indow va|lid?..wi|
|00000840| 6e 20 3d 20 46 72 6f 6e | 74 57 69 6e 64 6f 77 28 |n = Fron|tWindow(|
|00000850| 29 3b 0d 09 69 66 20 28 | 77 69 6e 20 3d 3d 20 6e |);..if (|win == n|
|00000860| 69 6c 29 0d 09 09 74 68 | 72 6f 77 28 63 6f 72 45 |il)...th|row(corE|
|00000870| 72 72 29 3b 0d 09 65 6c | 73 65 20 7b 0d 09 09 69 |rr);..el|se {...i|
|00000880| 66 20 28 28 28 57 69 6e | 64 6f 77 50 65 65 6b 29 |f (((Win|dowPeek)|
|00000890| 20 77 69 6e 29 2d 3e 72 | 65 66 43 6f 6e 20 3d 3d | win)->r|efCon ==|
|000008a0| 20 30 4c 29 0d 09 09 09 | 74 68 72 6f 77 28 63 6f | 0L)....|throw(co|
|000008b0| 72 45 72 72 29 3b 0d 09 | 09 69 66 20 28 28 28 57 |rErr);..|.if (((W|
|000008c0| 69 6e 64 6f 77 50 65 65 | 6b 29 20 77 69 6e 29 2d |indowPee|k) win)-|
|000008d0| 3e 77 69 6e 64 6f 77 4b | 69 6e 64 20 21 3d 20 31 |>windowK|ind != 1|
|000008e0| 32 20 26 26 20 28 28 57 | 69 6e 64 6f 77 50 65 65 |2 && ((W|indowPee|
|000008f0| 6b 29 20 77 69 6e 29 2d | 3e 77 69 6e 64 6f 77 4b |k) win)-|>windowK|
|00000900| 69 6e 64 20 21 3d 20 31 | 33 29 0d 09 09 09 74 68 |ind != 1|3)....th|
|00000910| 72 6f 77 28 63 6f 72 45 | 72 72 29 3b 0d 09 7d 0d |row(corE|rr);..}.|
|00000920| 0d 09 2f 2f 20 6d 61 6b | 65 20 73 75 72 65 20 74 |..// mak|e sure t|
|00000930| 68 65 20 63 75 72 72 65 | 6e 74 20 70 6f 72 74 20 |he curre|nt port |
|00000940| 69 73 20 76 61 6c 69 64 | 20 66 6f 72 20 63 61 6c |is valid| for cal|
|00000950| 6c 73 20 74 68 61 74 20 | 6d 61 79 20 72 65 73 75 |ls that |may resu|
|00000960| 6c 74 20 69 6e 20 72 65 | 6e 64 65 72 69 6e 67 0d |lt in re|ndering.|
|00000970| 09 53 65 74 50 6f 72 74 | 28 77 69 6e 29 3b 0d 0d |.SetPort|(win);..|
|00000980| 09 68 20 3d 20 28 50 55 | 46 52 65 73 6f 75 72 63 |.h = (PU|FResourc|
|00000990| 65 48 61 6e 64 6c 65 29 | 20 47 65 74 52 65 73 6f |eHandle)| GetReso|
|000009a0| 75 72 63 65 28 27 50 55 | 46 20 27 2c 20 31 32 38 |urce('PU|F ', 128|
|000009b0| 29 3b 0d 0d 09 69 66 20 | 28 68 20 3d 3d 20 6e 69 |);...if |(h == ni|
|000009c0| 6c 29 0d 09 09 74 68 72 | 6f 77 28 72 65 73 4e 6f |l)...thr|ow(resNo|
|000009d0| 74 46 6f 75 6e 64 29 3b | 0d 09 0d 09 72 65 74 75 |tFound);|....retu|
|000009e0| 72 6e 20 28 2a 2a 68 29 | 2e 63 6f 64 65 2d 3e 70 |rn (**h)|.code->p|
|000009f0| 72 6f 63 73 5b 76 65 63 | 74 6f 72 5d 3b 0d 7d 0d |rocs[vec|tor];.}.|
|00000a00| 0d 48 61 6e 64 6c 65 20 | 50 55 46 47 65 74 54 65 |.Handle |PUFGetTe|
|00000a10| 78 74 28 76 6f 69 64 29 | 0d 7b 0d 09 50 47 65 74 |xt(void)|.{..PGet|
|00000a20| 54 65 78 74 20 70 50 74 | 72 20 3d 20 47 65 74 50 |Text pPt|r = GetP|
|00000a30| 55 46 56 65 63 74 6f 72 | 28 65 47 65 74 57 69 6e |UFVector|(eGetWin|
|00000a40| 64 6f 77 54 65 78 74 29 | 3b 0d 09 0d 09 69 66 20 |dowText)|;....if |
|00000a50| 28 70 50 74 72 29 20 7b | 0d 09 09 48 61 6e 64 6c |(pPtr) {|...Handl|
|00000a60| 65 20 68 54 65 78 74 20 | 3d 20 28 2a 70 50 74 72 |e hText |= (*pPtr|
|00000a70| 29 20 28 46 72 6f 6e 74 | 57 69 6e 64 6f 77 28 29 |) (Front|Window()|
|00000a80| 29 3b 0d 09 09 50 47 65 | 74 53 65 6c 65 63 74 69 |);...PGe|tSelecti|
|00000a90| 6f 6e 20 70 47 65 74 53 | 65 6c 20 3d 20 47 65 74 |on pGetS|el = Get|
|00000aa0| 50 55 46 56 65 63 74 6f | 72 28 65 47 65 74 53 65 |PUFVecto|r(eGetSe|
|00000ab0| 6c 65 63 74 69 6f 6e 29 | 3b 0d 09 09 50 53 65 74 |lection)|;...PSet|
|00000ac0| 53 65 6c 65 63 74 69 6f | 6e 20 70 53 65 74 53 65 |Selectio|n pSetSe|
|00000ad0| 6c 20 3d 20 47 65 74 50 | 55 46 56 65 63 74 6f 72 |l = GetP|UFVector|
|00000ae0| 28 65 53 65 74 53 65 6c | 65 63 74 69 6f 6e 29 3b |(eSetSel|ection);|
|00000af0| 0d 09 09 6c 6f 6e 67 20 | 66 69 72 73 74 43 68 61 |...long |firstCha|
|00000b00| 72 3b 0d 09 09 6c 6f 6e | 67 20 73 65 6c 53 74 61 |r;...lon|g selSta|
|00000b10| 72 74 2c 20 73 65 6c 45 | 6e 64 3b 0d 09 09 6c 6f |rt, selE|nd;...lo|
|00000b20| 6e 67 20 65 6f 66 53 74 | 61 72 74 2c 20 65 6f 66 |ng eofSt|art, eof|
|00000b30| 45 6e 64 3b 0d 09 09 6c | 6f 6e 67 20 6d 61 78 53 |End;...l|ong maxS|
|00000b40| 69 7a 65 20 3d 20 47 65 | 74 48 61 6e 64 6c 65 53 |ize = Ge|tHandleS|
|00000b50| 69 7a 65 28 68 54 65 78 | 74 29 3b 0d 09 09 09 09 |ize(hTex|t);.....|
|00000b60| 0d 09 09 2f 2f 20 68 54 | 65 78 74 20 69 73 20 74 |...// hT|ext is t|
|00000b70| 68 65 20 68 61 6e 64 6c | 65 20 74 6f 20 74 68 65 |he handl|e to the|
|00000b80| 20 74 65 78 74 20 69 6e | 20 74 68 65 20 77 69 6e | text in| the win|
|00000b90| 64 6f 77 2c 20 74 68 61 | 74 20 68 61 6e 64 6c 65 |dow, tha|t handle|
|00000ba0| 20 63 61 6e 20 62 65 20 | 6d 75 63 68 20 62 69 67 | can be |much big|
|00000bb0| 67 65 72 20 74 68 61 6e | 0d 09 09 2f 2f 20 74 68 |ger than|...// th|
|00000bc0| 65 20 73 69 7a 65 20 6f | 66 20 74 68 65 20 68 61 |e size o|f the ha|
|00000bd0| 6e 64 6c 65 2e 0d 0d 09 | 09 2f 2f 20 66 69 67 75 |ndle....|.// figu|
|00000be0| 72 65 20 6f 75 74 20 68 | 6f 77 20 62 69 67 20 74 |re out h|ow big t|
|00000bf0| 68 65 20 66 69 6c 65 20 | 72 65 61 6c 6c 79 20 69 |he file |really i|
|00000c00| 73 0d 09 09 28 2a 70 47 | 65 74 53 65 6c 29 28 26 |s...(*pG|etSel)(&|
|00000c10| 73 65 6c 53 74 61 72 74 | 2c 20 26 73 65 6c 45 6e |selStart|, &selEn|
|00000c20| 64 2c 20 26 66 69 72 73 | 74 43 68 61 72 29 3b 0d |d, &firs|tChar);.|
|00000c30| 20 09 09 28 2a 70 53 65 | 74 53 65 6c 29 28 6d 61 | ..(*pSe|tSel)(ma|
|00000c40| 78 53 69 7a 65 2c 20 6d | 61 78 53 69 7a 65 2c 20 |xSize, m|axSize, |
|00000c50| 66 69 72 73 74 43 68 61 | 72 29 3b 0d 09 09 28 2a |firstCha|r);...(*|
|00000c60| 70 47 65 74 53 65 6c 29 | 28 26 65 6f 66 53 74 61 |pGetSel)|(&eofSta|
|00000c70| 72 74 2c 20 26 65 6f 66 | 45 6e 64 2c 20 26 66 69 |rt, &eof|End, &fi|
|00000c80| 72 73 74 43 68 61 72 29 | 3b 0d 09 09 28 2a 70 53 |rstChar)|;...(*pS|
|00000c90| 65 74 53 65 6c 29 28 73 | 65 6c 53 74 61 72 74 2c |etSel)(s|elStart,|
|00000ca0| 20 73 65 6c 45 6e 64 2c | 20 66 69 72 73 74 43 68 | selEnd,| firstCh|
|00000cb0| 61 72 29 3b 0d 09 09 09 | 0d 09 09 48 61 6e 64 54 |ar);....|...HandT|
|00000cc0| 6f 48 61 6e 64 28 26 68 | 54 65 78 74 29 3b 0d 09 |oHand(&h|Text);..|
|00000cd0| 09 53 65 74 48 61 6e 64 | 6c 65 53 69 7a 65 28 68 |.SetHand|leSize(h|
|00000ce0| 54 65 78 74 2c 20 65 6f | 66 53 74 61 72 74 20 2b |Text, eo|fStart +|
|00000cf0| 20 31 29 3b 0d 09 09 28 | 2a 68 54 65 78 74 29 5b | 1);...(|*hText)[|
|00000d00| 65 6f 66 53 74 61 72 74 | 5d 20 3d 20 30 3b 09 2f |eofStart|] = 0;./|
|00000d10| 2f 20 6e 75 6c 6c 20 74 | 65 72 6d 69 6e 61 74 65 |/ null t|erminate|
|00000d20| 0d 09 0d 09 09 72 65 74 | 75 72 6e 20 68 54 65 78 |.....ret|urn hTex|
|00000d30| 74 3b 0d 09 7d 0d 09 09 | 0d 09 72 65 74 75 72 6e |t;..}...|..return|
|00000d40| 20 6e 69 6c 3b 0d 7d 0d | 0d 76 6f 69 64 20 50 55 | nil;.}.|.void PU|
|00000d50| 46 50 61 73 74 65 54 65 | 78 74 28 48 61 6e 64 6c |FPasteTe|xt(Handl|
|00000d60| 65 20 68 54 65 78 74 29 | 0d 7b 0d 09 50 50 61 73 |e hText)|.{..PPas|
|00000d70| 74 65 54 65 78 74 20 70 | 50 74 72 20 3d 20 47 65 |teText p|Ptr = Ge|
|00000d80| 74 50 55 46 56 65 63 74 | 6f 72 28 65 52 65 70 6c |tPUFVect|or(eRepl|
|00000d90| 61 63 65 53 65 6c 65 63 | 74 69 6f 6e 29 3b 0d 09 |aceSelec|tion);..|
|00000da0| 0d 09 69 66 20 28 70 50 | 74 72 29 20 7b 0d 09 09 |..if (pP|tr) {...|
|00000db0| 2f 2f 20 73 61 76 65 20 | 74 68 65 20 6f 6c 64 20 |// save |the old |
|00000dc0| 63 6c 69 70 62 6f 61 72 | 64 0d 09 09 48 61 6e 64 |clipboar|d...Hand|
|00000dd0| 6c 65 20 68 53 61 76 65 | 20 3d 20 47 65 74 50 55 |le hSave| = GetPU|
|00000de0| 46 53 63 72 61 70 28 29 | 3b 0d 09 09 69 66 20 28 |FScrap()|;...if (|
|00000df0| 48 61 6e 64 54 6f 48 61 | 6e 64 28 26 68 53 61 76 |HandToHa|nd(&hSav|
|00000e00| 65 29 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 09 09 |e) != no|Err)....|
|00000e10| 68 53 61 76 65 20 3d 20 | 6e 69 6c 3b 0d 09 09 28 |hSave = |nil;...(|
|00000e20| 2a 70 50 74 72 29 20 28 | 68 54 65 78 74 29 3b 0d |*pPtr) (|hText);.|
|00000e30| 09 09 69 66 20 28 68 53 | 61 76 65 29 20 7b 0d 09 |..if (hS|ave) {..|
|00000e40| 09 09 48 61 6e 64 6c 65 | 20 63 75 72 53 63 72 61 |..Handle| curScra|
|00000e50| 70 20 3d 20 47 65 74 50 | 55 46 53 63 72 61 70 28 |p = GetP|UFScrap(|
|00000e60| 29 3b 0d 09 09 09 73 68 | 6f 72 74 20 73 61 76 65 |);....sh|ort save|
|00000e70| 53 69 7a 65 20 3d 20 47 | 65 74 48 61 6e 64 6c 65 |Size = G|etHandle|
|00000e80| 53 69 7a 65 28 68 53 61 | 76 65 29 3b 0d 09 09 09 |Size(hSa|ve);....|
|00000e90| 53 65 74 48 61 6e 64 6c | 65 53 69 7a 65 28 63 75 |SetHandl|eSize(cu|
|00000ea0| 72 53 63 72 61 70 2c 20 | 73 61 76 65 53 69 7a 65 |rScrap, |saveSize|
|00000eb0| 29 3b 0d 09 09 09 42 6c | 6f 63 6b 4d 6f 76 65 28 |);....Bl|ockMove(|
|00000ec0| 2a 68 53 61 76 65 2c 20 | 2a 63 75 72 53 63 72 61 |*hSave, |*curScra|
|00000ed0| 70 2c 20 73 61 76 65 53 | 69 7a 65 29 3b 0d 09 09 |p, saveS|ize);...|
|00000ee0| 09 44 69 73 70 6f 73 65 | 48 61 6e 64 6c 65 28 68 |.Dispose|Handle(h|
|00000ef0| 53 61 76 65 29 3b 0d 09 | 09 7d 0d 09 7d 0d 7d 0d |Save);..|.}..}.}.|
|00000f00| 0d 76 6f 69 64 20 50 55 | 46 47 65 74 53 65 6c 65 |.void PU|FGetSele|
|00000f10| 63 74 69 6f 6e 28 6c 6f | 6e 67 2a 20 73 65 6c 53 |ction(lo|ng* selS|
|00000f20| 74 61 72 74 2c 20 6c 6f | 6e 67 2a 20 73 65 6c 45 |tart, lo|ng* selE|
|00000f30| 6e 64 29 0d 7b 0d 09 50 | 47 65 74 53 65 6c 65 63 |nd).{..P|GetSelec|
|00000f40| 74 69 6f 6e 20 70 50 74 | 72 20 3d 20 47 65 74 50 |tion pPt|r = GetP|
|00000f50| 55 46 56 65 63 74 6f 72 | 28 65 47 65 74 53 65 6c |UFVector|(eGetSel|
|00000f60| 65 63 74 69 6f 6e 29 3b | 0d 09 6c 6f 6e 67 20 66 |ection);|..long f|
|00000f70| 69 72 73 74 43 68 61 72 | 3b 0d 09 0d 09 69 66 20 |irstChar|;....if |
|00000f80| 28 70 50 74 72 29 0d 09 | 09 28 2a 70 50 74 72 29 |(pPtr)..|.(*pPtr)|
|00000f90| 20 28 73 65 6c 53 74 61 | 72 74 2c 20 73 65 6c 45 | (selSta|rt, selE|
|00000fa0| 6e 64 2c 20 26 66 69 72 | 73 74 43 68 61 72 29 3b |nd, &fir|stChar);|
|00000fb0| 0d 7d 0d 0d 76 6f 69 64 | 20 50 55 46 53 65 74 53 |.}..void| PUFSetS|
|00000fc0| 65 6c 65 63 74 69 6f 6e | 28 6c 6f 6e 67 20 73 65 |election|(long se|
|00000fd0| 6c 53 74 61 72 74 2c 20 | 6c 6f 6e 67 20 73 65 6c |lStart, |long sel|
|00000fe0| 45 6e 64 29 0d 7b 0d 09 | 50 53 65 74 53 65 6c 65 |End).{..|PSetSele|
|00000ff0| 63 74 69 6f 6e 20 70 50 | 74 72 20 3d 20 47 65 74 |ction pP|tr = Get|
|00001000| 50 55 46 56 65 63 74 6f | 72 28 65 53 65 74 53 65 |PUFVecto|r(eSetSe|
|00001010| 6c 65 63 74 69 6f 6e 29 | 3b 0d 0d 09 69 66 20 28 |lection)|;...if (|
|00001020| 70 50 74 72 29 0d 09 09 | 28 2a 70 50 74 72 29 20 |pPtr)...|(*pPtr) |
|00001030| 28 73 65 6c 53 74 61 72 | 74 2c 20 73 65 6c 45 6e |(selStar|t, selEn|
|00001040| 64 2c 20 73 65 6c 53 74 | 61 72 74 29 3b 20 2f 2f |d, selSt|art); //|
|00001050| 20 73 65 6c 53 74 61 72 | 74 20 61 73 20 6c 61 73 | selStar|t as las|
|00001060| 74 20 70 61 72 61 6d 65 | 74 65 72 3a 20 6d 61 6b |t parame|ter: mak|
|00001070| 65 20 66 69 72 73 74 20 | 63 68 61 72 20 6f 66 20 |e first |char of |
|00001080| 73 65 6c 65 63 74 69 6f | 6e 20 76 69 73 69 62 6c |selectio|n visibl|
|00001090| 65 0d 7d 0d 0d 48 61 6e | 64 6c 65 20 50 55 46 43 |e.}..Han|dle PUFC|
|000010a0| 6f 70 79 53 65 6c 65 63 | 74 69 6f 6e 28 29 0d 7b |opySelec|tion().{|
|000010b0| 0d 09 50 43 6f 70 79 53 | 65 6c 65 63 74 69 6f 6e |..PCopyS|election|
|000010c0| 20 70 50 74 72 20 3d 20 | 47 65 74 50 55 46 56 65 | pPtr = |GetPUFVe|
|000010d0| 63 74 6f 72 28 65 43 6f | 70 79 53 65 6c 65 63 74 |ctor(eCo|pySelect|
|000010e0| 69 6f 6e 29 3b 0d 09 0d | 09 69 66 20 28 70 50 74 |ion);...|.if (pPt|
|000010f0| 72 29 0d 09 09 72 65 74 | 75 72 6e 20 28 2a 70 50 |r)...ret|urn (*pP|
|00001100| 74 72 29 28 29 3b 0d 09 | 09 0d 09 72 65 74 75 72 |tr)();..|...retur|
|00001110| 6e 20 6e 69 6c 3b 0d 7d | 0d 0d 76 6f 69 64 20 50 |n nil;.}|..void P|
|00001120| 55 46 47 65 74 46 69 6c | 65 53 70 65 63 28 46 53 |UFGetFil|eSpec(FS|
|00001130| 53 70 65 63 2a 20 73 70 | 65 63 29 0d 7b 0d 09 50 |Spec* sp|ec).{..P|
|00001140| 47 65 74 44 6f 63 49 6e | 66 6f 20 70 50 74 72 20 |GetDocIn|fo pPtr |
|00001150| 3d 20 47 65 74 50 55 46 | 56 65 63 74 6f 72 28 65 |= GetPUF|Vector(e|
|00001160| 47 65 74 44 6f 63 49 6e | 66 6f 29 3b 0d 09 0d 09 |GetDocIn|fo);....|
|00001170| 69 66 20 28 70 50 74 72 | 29 0d 09 09 28 2a 70 50 |if (pPtr|)...(*pP|
|00001180| 74 72 29 20 28 46 72 6f | 6e 74 57 69 6e 64 6f 77 |tr) (Fro|ntWindow|
|00001190| 28 29 2c 20 73 70 65 63 | 2d 3e 6e 61 6d 65 2c 20 |(), spec|->name, |
|000011a0| 26 73 70 65 63 2d 3e 76 | 52 65 66 4e 75 6d 2c 20 |&spec->v|RefNum, |
|000011b0| 26 73 70 65 63 2d 3e 70 | 61 72 49 44 29 3b 0d 7d |&spec->p|arID);.}|
|000011c0| 0d 0d 73 74 61 74 69 63 | 20 42 6f 6f 6c 65 61 6e |..static| Boolean|
|000011d0| 20 50 53 74 72 45 71 75 | 61 6c 28 75 6e 73 69 67 | PStrEqu|al(unsig|
|000011e0| 6e 65 64 20 63 68 61 72 | 2a 20 61 2c 20 75 6e 73 |ned char|* a, uns|
|000011f0| 69 67 6e 65 64 20 63 68 | 61 72 2a 20 62 29 0d 7b |igned ch|ar* b).{|
|00001200| 0d 09 63 68 61 72 20 6c | 65 6e 20 3d 20 2a 61 2b |..char l|en = *a+|
|00001210| 2b 3b 0d 0d 09 69 66 20 | 28 6c 65 6e 20 21 3d 20 |+;...if |(len != |
|00001220| 2a 62 2b 2b 29 0d 09 09 | 72 65 74 75 72 6e 20 66 |*b++)...|return f|
|00001230| 61 6c 73 65 3b 0d 09 0d | 09 72 65 74 75 72 6e 20 |alse;...|.return |
|00001240| 73 74 72 6e 63 61 73 65 | 63 6d 70 28 28 63 6f 6e |strncase|cmp((con|
|00001250| 73 74 20 63 68 61 72 2a | 29 20 61 2c 28 63 6f 6e |st char*|) a,(con|
|00001260| 73 74 20 63 68 61 72 2a | 29 20 62 2c 20 6c 65 6e |st char*|) b, len|
|00001270| 29 20 3d 3d 20 30 3b 0d | 7d 0d 0d 42 6f 6f 6c 65 |) == 0;.|}..Boole|
|00001280| 61 6e 20 50 55 46 47 65 | 74 4e 74 68 4d 61 72 6b |an PUFGe|tNthMark|
|00001290| 65 72 28 73 68 6f 72 74 | 20 69 78 4d 61 72 6b 65 |er(short| ixMarke|
|000012a0| 72 2c 20 50 55 46 4d 61 | 72 6b 65 72 2a 20 6d 61 |r, PUFMa|rker* ma|
|000012b0| 72 6b 65 72 29 0d 7b 0d | 09 75 6e 73 69 67 6e 65 |rker).{.|.unsigne|
|000012c0| 64 20 63 68 61 72 2a 20 | 70 3b 0d 09 73 68 6f 72 |d char* |p;..shor|
|000012d0| 74 20 63 74 4d 61 72 6b | 65 72 73 3b 0d 09 6c 6f |t ctMark|ers;..lo|
|000012e0| 6e 67 2a 20 6d 61 72 6b | 65 72 53 74 61 72 74 3b |ng* mark|erStart;|
|000012f0| 0d 09 0d 09 6d 61 72 6b | 65 72 2d 3e 6e 61 6d 65 |....mark|er->name|
|00001300| 5b 30 5d 20 3d 20 30 3b | 0d 09 6d 61 72 6b 65 72 |[0] = 0;|..marker|
|00001310| 2d 3e 73 65 6c 53 74 61 | 72 74 20 3d 20 30 3b 0d |->selSta|rt = 0;.|
|00001320| 09 6d 61 72 6b 65 72 2d | 3e 73 65 6c 45 6e 64 20 |.marker-|>selEnd |
|00001330| 3d 20 30 3b 0d 0d 09 61 | 73 6d 20 7b 0d 09 09 63 |= 0;...a|sm {...c|
|00001340| 6c 72 2e 6c 09 2d 28 73 | 70 29 0d 09 09 5f 46 72 |lr.l.-(s|p)..._Fr|
|00001350| 6f 6e 74 57 69 6e 64 6f | 77 0d 09 09 6d 6f 76 65 |ontWindo|w...move|
|00001360| 2e 6c 09 28 73 70 29 2b | 2c 64 30 0d 09 09 62 65 |.l.(sp)+|,d0...be|
|00001370| 71 09 09 40 6e 6f 67 6f | 6f 64 09 09 09 3b 20 69 |q..@nogo|od...; i|
|00001380| 73 20 74 68 65 72 65 20 | 61 20 66 72 6f 6e 74 20 |s there |a front |
|00001390| 77 69 6e 64 6f 77 0d 09 | 09 6d 6f 76 65 2e 6c 09 |window..|.move.l.|
|000013a0| 64 30 2c 61 30 0d 09 09 | 0d 09 09 6d 6f 76 65 2e |d0,a0...|...move.|
|000013b0| 6c 09 30 78 39 38 28 61 | 30 29 2c 64 30 09 09 3b |l.0x98(a|0),d0..;|
|000013c0| 20 30 78 39 38 20 69 73 | 20 74 68 65 20 72 65 66 | 0x98 is| the ref|
|000013d0| 63 6f 6e 0d 09 09 62 65 | 71 09 09 40 6e 6f 67 6f |con...be|q..@nogo|
|000013e0| 6f 64 0d 09 09 0d 09 09 | 6d 6f 76 65 2e 6c 09 30 |od......|move.l.0|
|000013f0| 78 33 30 34 28 61 30 29 | 2c 64 30 09 3b 20 70 72 |x304(a0)|,d0.; pr|
|00001400| 69 76 61 74 65 20 64 61 | 74 61 20 66 6f 72 20 74 |ivate da|ta for t|
|00001410| 68 65 20 6d 61 72 6b 65 | 72 73 0d 09 09 62 65 71 |he marke|rs...beq|
|00001420| 09 09 40 6e 6f 67 6f 6f | 64 0d 09 09 0d 09 09 6d |..@nogoo|d......m|
|00001430| 6f 76 65 2e 6c 09 64 30 | 2c 61 30 0d 09 09 6d 6f |ove.l.d0|,a0...mo|
|00001440| 76 65 2e 6c 09 28 61 30 | 29 2c 61 30 0d 0d 09 09 |ve.l.(a0|),a0....|
|00001450| 6d 6f 76 65 2e 77 09 28 | 61 30 29 2b 2c 63 74 4d |move.w.(|a0)+,ctM|
|00001460| 61 72 6b 65 72 73 0d 09 | 09 6d 6f 76 65 2e 6c 09 |arkers..|.move.l.|
|00001470| 61 30 2c 70 0d 09 7d 0d | 0d 09 2f 2f 20 6d 61 72 |a0,p..}.|..// mar|
|00001480| 6b 65 72 20 69 6e 20 72 | 61 6e 67 65 3f 0d 09 69 |ker in r|ange?..i|
|00001490| 66 20 28 28 69 78 4d 61 | 72 6b 65 72 20 2b 20 31 |f ((ixMa|rker + 1|
|000014a0| 29 20 3e 20 63 74 4d 61 | 72 6b 65 72 73 29 20 7b |) > ctMa|rkers) {|
|000014b0| 0d 09 09 61 73 6d 20 7b | 0d 09 09 40 6e 6f 67 6f |...asm {|...@nogo|
|000014c0| 6f 64 0d 09 09 7d 0d 09 | 09 72 65 74 75 72 6e 20 |od...}..|.return |
|000014d0| 66 61 6c 73 65 3b 0d 09 | 7d 0d 09 0d 09 66 6f 72 |false;..|}....for|
|000014e0| 20 28 3b 20 69 78 4d 61 | 72 6b 65 72 20 3e 3d 20 | (; ixMa|rker >= |
|000014f0| 30 3b 20 20 69 78 4d 61 | 72 6b 65 72 2d 2d 29 20 |0; ixMa|rker--) |
|00001500| 7b 0d 09 09 6d 61 72 6b | 65 72 53 74 61 72 74 20 |{...mark|erStart |
|00001510| 3d 20 28 6c 6f 6e 67 2a | 29 20 70 3b 0d 09 09 70 |= (long*|) p;...p|
|00001520| 20 2b 3d 20 28 73 69 7a | 65 6f 66 28 6c 6f 6e 67 | += (siz|eof(long|
|00001530| 29 20 2a 20 32 29 3b 09 | 09 2f 2f 20 73 6b 69 70 |) * 2);.|.// skip|
|00001540| 20 74 68 65 20 74 77 6f | 20 6c 6f 6e 67 73 0d 09 | the two| longs..|
|00001550| 09 0d 09 09 69 66 20 28 | 28 2a 70 20 25 20 31 29 |....if (|(*p % 1)|
|00001560| 20 3d 3d 20 30 29 20 2f | 2f 20 6e 65 65 64 20 74 | == 0) /|/ need t|
|00001570| 6f 20 70 61 64 0d 09 09 | 09 70 20 2b 3d 20 28 2a |o pad...|.p += (*|
|00001580| 70 29 20 2b 20 31 3b 0d | 09 09 65 6c 73 65 0d 09 |p) + 1;.|..else..|
|00001590| 09 09 70 20 2b 3d 20 2a | 70 3b 0d 09 7d 0d 0d 09 |..p += *|p;..}...|
|000015a0| 2f 2f 20 72 69 67 68 74 | 20 6e 6f 77 2c 20 6d 61 |// right| now, ma|
|000015b0| 72 6b 65 72 53 74 61 72 | 74 20 73 68 6f 75 6c 64 |rkerStar|t should|
|000015c0| 20 70 6f 69 6e 74 20 61 | 74 20 74 68 65 20 73 74 | point a|t the st|
|000015d0| 61 72 74 20 6f 66 20 74 | 68 69 73 20 6d 61 72 6b |art of t|his mark|
|000015e0| 65 72 0d 09 6d 61 72 6b | 65 72 2d 3e 73 65 6c 53 |er..mark|er->selS|
|000015f0| 74 61 72 74 20 3d 20 2a | 6d 61 72 6b 65 72 53 74 |tart = *|markerSt|
|00001600| 61 72 74 2b 2b 3b 0d 09 | 6d 61 72 6b 65 72 2d 3e |art++;..|marker->|
|00001610| 73 65 6c 45 6e 64 20 3d | 20 2a 6d 61 72 6b 65 72 |selEnd =| *marker|
|00001620| 53 74 61 72 74 2b 2b 3b | 0d 09 70 20 3d 20 28 75 |Start++;|..p = (u|
|00001630| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 2a 29 20 6d |nsigned |char*) m|
|00001640| 61 72 6b 65 72 53 74 61 | 72 74 3b 0d 0d 09 2f 2f |arkerSta|rt;...//|
|00001650| 20 6f 6b 2c 20 74 68 69 | 73 20 69 73 20 6c 65 67 | ok, thi|s is leg|
|00001660| 69 74 69 6d 61 74 65 6c | 79 20 73 74 72 61 6e 67 |itimatel|y strang|
|00001670| 65 3a 20 69 66 20 6d 61 | 72 6b 65 72 4e 61 6d 65 |e: if ma|rkerName|
|00001680| 20 69 73 20 61 6e 20 65 | 76 65 6e 20 6e 75 6d 62 | is an e|ven numb|
|00001690| 65 72 20 6f 66 20 62 79 | 74 65 73 20 6c 6f 6e 67 |er of by|tes long|
|000016a0| 2c 0d 09 2f 2f 20 77 65 | 20 6e 65 65 64 20 74 6f |,..// we| need to|
|000016b0| 20 69 6e 63 72 65 6d 65 | 6e 74 20 69 74 73 20 73 | increme|nt its s|
|000016c0| 69 7a 65 20 62 79 20 6f | 6e 65 2c 20 61 6e 64 20 |ize by o|ne, and |
|000016d0| 70 61 64 20 77 69 74 68 | 20 61 20 6e 75 6c 6c 3a |pad with| a null:|
|000016e0| 0d 09 2f 2f 20 30 78 30 | 34 2c 20 22 66 72 65 64 |..// 0x0|4, "fred|
|000016f0| 22 20 2d 3e 20 30 78 30 | 35 2c 20 22 66 72 65 64 |" -> 0x0|5, "fred|
|00001700| 5c 30 22 2c 20 77 68 69 | 63 68 20 69 73 20 77 68 |\0", whi|ch is wh|
|00001710| 61 74 20 69 73 20 69 6e | 20 74 68 65 20 4d 50 53 |at is in| the MPS|
|00001720| 52 0d 0d 09 42 6c 6f 63 | 6b 4d 6f 76 65 28 70 2c |R...Bloc|kMove(p,|
|00001730| 20 6d 61 72 6b 65 72 2d | 3e 6e 61 6d 65 2c 20 2a | marker-|>name, *|
|00001740| 70 20 2b 20 31 29 3b 0d | 0d 09 69 66 20 28 28 2a |p + 1);.|..if ((*|
|00001750| 70 20 26 20 30 78 30 31 | 29 20 21 3d 20 30 20 26 |p & 0x01|) != 0 &|
|00001760| 26 20 6d 61 72 6b 65 72 | 2d 3e 6e 61 6d 65 5b 2a |& marker|->name[*|
|00001770| 70 5d 20 3d 3d 20 30 78 | 30 30 29 0d 09 09 6d 61 |p] == 0x|00)...ma|
|00001780| 72 6b 65 72 2d 3e 6e 61 | 6d 65 5b 30 5d 2d 2d 3b |rker->na|me[0]--;|
|00001790| 0d 0d 09 72 65 74 75 72 | 6e 20 74 72 75 65 3b 0d |...retur|n true;.|
|000017a0| 7d 0d 0d 76 6f 69 64 20 | 50 55 46 47 65 74 4d 61 |}..void |PUFGetMa|
|000017b0| 72 6b 65 72 50 6f 73 28 | 53 74 72 32 35 35 20 6d |rkerPos(|Str255 m|
|000017c0| 61 72 6b 65 72 4e 61 6d | 65 2c 20 50 55 46 4d 61 |arkerNam|e, PUFMa|
|000017d0| 72 6b 65 72 2a 20 6d 61 | 72 6b 65 72 29 0d 7b 0d |rker* ma|rker).{.|
|000017e0| 09 73 68 6f 72 74 20 69 | 3b 0d 09 50 55 46 4d 61 |.short i|;..PUFMa|
|000017f0| 72 6b 65 72 20 6f 6e 65 | 4d 61 72 6b 65 72 3b 0d |rker one|Marker;.|
|00001800| 0d 09 6d 61 72 6b 65 72 | 2d 3e 6e 61 6d 65 5b 30 |..marker|->name[0|
|00001810| 5d 20 3d 20 30 3b 0d 09 | 6d 61 72 6b 65 72 2d 3e |] = 0;..|marker->|
|00001820| 73 65 6c 53 74 61 72 74 | 20 3d 20 30 3b 0d 09 6d |selStart| = 0;..m|
|00001830| 61 72 6b 65 72 2d 3e 73 | 65 6c 45 6e 64 20 3d 20 |arker->s|elEnd = |
|00001840| 30 3b 0d 0d 09 66 6f 72 | 20 28 69 20 3d 20 30 3b |0;...for| (i = 0;|
|00001850| 20 20 74 72 75 65 3b 20 | 20 69 2b 2b 29 20 7b 0d | true; | i++) {.|
|00001860| 09 09 69 66 20 28 21 20 | 50 55 46 47 65 74 4e 74 |..if (! |PUFGetNt|
|00001870| 68 4d 61 72 6b 65 72 28 | 69 2c 20 26 6f 6e 65 4d |hMarker(|i, &oneM|
|00001880| 61 72 6b 65 72 29 29 0d | 09 09 09 62 72 65 61 6b |arker)).|...break|
|00001890| 3b 0d 0d 09 09 69 66 20 | 28 50 53 74 72 45 71 75 |;....if |(PStrEqu|
|000018a0| 61 6c 28 6f 6e 65 4d 61 | 72 6b 65 72 2e 6e 61 6d |al(oneMa|rker.nam|
|000018b0| 65 2c 20 6d 61 72 6b 65 | 72 4e 61 6d 65 29 29 20 |e, marke|rName)) |
|000018c0| 7b 0d 09 09 09 42 6c 6f | 63 6b 4d 6f 76 65 28 26 |{....Blo|ckMove(&|
|000018d0| 6f 6e 65 4d 61 72 6b 65 | 72 2c 20 6d 61 72 6b 65 |oneMarke|r, marke|
|000018e0| 72 2c 20 73 69 7a 65 6f | 66 28 50 55 46 4d 61 72 |r, sizeo|f(PUFMar|
|000018f0| 6b 65 72 29 29 3b 0d 09 | 09 09 72 65 74 75 72 6e |ker));..|..return|
|00001900| 3b 0d 09 09 7d 0d 09 7d | 0d 7d 0d 0d 73 74 61 74 |;...}..}|.}..stat|
|00001910| 69 63 20 76 6f 69 64 20 | 4d 61 6b 65 4d 61 72 6b |ic void |MakeMark|
|00001920| 65 72 73 44 69 72 74 79 | 28 29 0d 7b 0d 09 61 73 |ersDirty|().{..as|
|00001930| 6d 20 7b 0d 09 09 63 6c | 72 2e 6c 09 2d 28 73 70 |m {...cl|r.l.-(sp|
|00001940| 29 0d 09 09 5f 46 72 6f | 6e 74 57 69 6e 64 6f 77 |)..._Fro|ntWindow|
|00001950| 0d 09 09 6d 6f 76 65 2e | 6c 09 28 73 70 29 2b 2c |...move.|l.(sp)+,|
|00001960| 64 30 0d 09 09 62 65 71 | 2e 73 09 40 6e 6f 67 6f |d0...beq|.s.@nogo|
|00001970| 6f 64 0d 09 09 6d 6f 76 | 65 2e 6c 09 64 30 2c 61 |od...mov|e.l.d0,a|
|00001980| 30 0d 09 09 0d 09 09 6d | 6f 76 65 2e 6c 09 30 78 |0......m|ove.l.0x|
|00001990| 39 38 28 61 30 29 2c 64 | 30 09 09 3b 20 30 78 39 |98(a0),d|0..; 0x9|
|000019a0| 38 20 69 73 20 74 68 65 | 20 72 65 66 63 6f 6e 2c |8 is the| refcon,|
|000019b0| 20 61 20 68 61 6e 64 6c | 65 0d 09 09 62 65 71 09 | a handl|e...beq.|
|000019c0| 09 40 6e 6f 67 6f 6f 64 | 0d 09 09 0d 09 09 6d 6f |.@nogood|......mo|
|000019d0| 76 65 2e 6c 09 64 30 2c | 61 30 0d 09 09 6d 6f 76 |ve.l.d0,|a0...mov|
|000019e0| 65 2e 6c 09 28 61 30 29 | 2c 61 30 09 09 09 3b 20 |e.l.(a0)|,a0...; |
|000019f0| 70 74 72 20 74 6f 20 70 | 72 69 76 61 74 65 20 64 |ptr to p|rivate d|
|00001a00| 61 74 61 0d 09 09 0d 09 | 09 6d 6f 76 65 2e 77 09 |ata.....|.move.w.|
|00001a10| 23 31 2c 30 78 32 32 28 | 61 30 29 09 09 3b 20 73 |#1,0x22(|a0)..; s|
|00001a20| 75 72 65 20 69 74 73 20 | 6d 61 67 69 63 2e 0d 09 |ure its |magic...|
|00001a30| 09 0d 09 40 6e 6f 67 6f | 6f 64 0d 09 7d 0d 7d 0d |...@nogo|od..}.}.|
|00001a40| 0d 76 6f 69 64 20 50 55 | 46 44 65 6c 65 74 65 4d |.void PU|FDeleteM|
|00001a50| 61 72 6b 65 72 28 53 74 | 72 32 35 35 20 6e 61 6d |arker(St|r255 nam|
|00001a60| 65 29 0d 7b 0d 09 72 65 | 67 69 73 74 65 72 20 48 |e).{..re|gister H|
|00001a70| 61 6e 64 6c 65 20 6d 61 | 72 6b 65 72 48 61 6e 64 |andle ma|rkerHand|
|00001a80| 6c 65 3b 0d 09 72 65 67 | 69 73 74 65 72 20 73 74 |le;..reg|ister st|
|00001a90| 72 75 63 74 20 53 79 6d | 4d 61 6b 65 72 20 7b 20 |ruct Sym|Maker { |
|00001aa0| 0d 09 09 6c 6f 6e 67 20 | 73 65 6c 53 74 61 72 74 |...long |selStart|
|00001ab0| 3b 20 20 0d 09 09 6c 6f | 6e 67 20 73 65 6c 45 6e |; ...lo|ng selEn|
|00001ac0| 64 3b 0d 09 09 75 6e 73 | 69 67 6e 65 64 20 63 68 |d;...uns|igned ch|
|00001ad0| 61 72 20 6e 61 6d 65 5b | 5d 3b 0d 09 7d 20 2a 70 |ar name[|];..} *p|
|00001ae0| 4d 61 72 6b 65 72 3b 0d | 09 72 65 67 69 73 74 65 |Marker;.|.registe|
|00001af0| 72 20 63 74 4d 61 72 6b | 65 72 73 3b 0d 09 72 65 |r ctMark|ers;..re|
|00001b00| 67 69 73 74 65 72 20 73 | 68 6f 72 74 20 69 3b 0d |gister s|hort i;.|
|00001b10| 09 0d 09 2f 2f 20 67 65 | 74 20 74 68 65 20 6d 61 |...// ge|t the ma|
|00001b20| 72 6b 65 72 20 68 61 6e | 64 6c 65 0d 09 61 73 6d |rker han|dle..asm|
|00001b30| 20 7b 0d 09 09 63 6c 72 | 2e 6c 09 2d 28 73 70 29 | {...clr|.l.-(sp)|
|00001b40| 0d 09 09 5f 46 72 6f 6e | 74 57 69 6e 64 6f 77 0d |..._Fron|tWindow.|
|00001b50| 09 09 6d 6f 76 65 2e 6c | 09 28 73 70 29 2b 2c 64 |..move.l|.(sp)+,d|
|00001b60| 30 0d 09 09 62 65 71 09 | 09 40 6e 6f 67 6f 6f 64 |0...beq.|.@nogood|
|00001b70| 09 09 09 3b 20 69 73 20 | 74 68 65 72 65 20 61 20 |...; is |there a |
|00001b80| 66 72 6f 6e 74 20 77 69 | 6e 64 6f 77 0d 09 09 6d |front wi|ndow...m|
|00001b90| 6f 76 65 2e 6c 09 64 30 | 2c 61 30 0d 09 09 0d 09 |ove.l.d0|,a0.....|
|00001ba0| 09 74 73 74 2e 6c 09 30 | 78 39 38 28 61 30 29 09 |.tst.l.0|x98(a0).|
|00001bb0| 09 3b 20 30 78 39 38 20 | 69 73 20 74 68 65 20 72 |.; 0x98 |is the r|
|00001bc0| 65 66 63 6f 6e 0d 09 09 | 62 65 71 09 09 40 6e 6f |efcon...|beq..@no|
|00001bd0| 67 6f 6f 64 0d 09 09 0d | 09 09 74 73 74 2e 6c 09 |good....|..tst.l.|
|00001be0| 30 78 33 30 34 28 61 30 | 29 09 09 3b 20 64 6f 20 |0x304(a0|)..; do |
|00001bf0| 77 65 20 68 61 76 65 20 | 61 6e 79 20 6f 66 20 74 |we have |any of t|
|00001c00| 68 65 73 65 3f 0d 09 09 | 62 65 71 09 09 40 6e 6f |hese?...|beq..@no|
|00001c10| 67 6f 6f 64 0d 09 09 0d | 09 09 6d 6f 76 65 2e 6c |good....|..move.l|
|00001c20| 09 30 78 33 30 34 28 61 | 30 29 2c 6d 61 72 6b 65 |.0x304(a|0),marke|
|00001c30| 72 48 61 6e 64 6c 65 09 | 3b 20 70 72 69 76 61 74 |rHandle.|; privat|
|00001c40| 65 20 64 61 74 61 20 66 | 6f 72 20 74 68 65 20 6d |e data f|or the m|
|00001c50| 61 72 6b 65 72 73 0d 09 | 09 0d 09 09 6d 6f 76 65 |arkers..|....move|
|00001c60| 2e 6c 09 28 6d 61 72 6b | 65 72 48 61 6e 64 6c 65 |.l.(mark|erHandle|
|00001c70| 29 2c 61 30 0d 09 09 6d | 6f 76 65 2e 77 09 28 61 |),a0...m|ove.w.(a|
|00001c80| 30 29 2b 2c 63 74 4d 61 | 72 6b 65 72 73 3b 0d 09 |0)+,ctMa|rkers;..|
|00001c90| 09 6d 6f 76 65 2e 6c 09 | 61 30 2c 70 4d 61 72 6b |.move.l.|a0,pMark|
|00001ca0| 65 72 0d 09 09 0d 09 09 | 3b 20 70 4d 61 72 6b 65 |er......|; pMarke|
|00001cb0| 72 20 70 6f 69 6e 74 73 | 20 61 74 20 74 68 65 20 |r points| at the |
|00001cc0| 66 69 72 73 74 20 6d 61 | 72 6b 65 72 0d 09 09 3b |first ma|rker...;|
|00001cd0| 20 63 74 4d 61 72 6b 65 | 73 20 63 6f 6e 74 61 69 | ctMarke|s contai|
|00001ce0| 6e 73 20 74 68 65 20 74 | 6f 74 61 6c 20 6e 75 6d |ns the t|otal num|
|00001cf0| 62 65 72 20 6f 66 20 6d | 61 72 6b 65 72 73 0d 09 |ber of m|arkers..|
|00001d00| 09 3b 20 6d 61 72 6b 65 | 72 48 61 6e 64 6c 65 20 |.; marke|rHandle |
|00001d10| 63 6f 6e 74 61 69 6e 73 | 20 74 68 65 20 6f 72 69 |contains| the ori|
|00001d20| 67 69 6e 61 6c 20 68 61 | 6e 64 6c 65 0d 09 7d 0d |ginal ha|ndle..}.|
|00001d30| 09 0d 09 66 6f 72 20 28 | 69 20 3d 20 30 3b 20 20 |...for (|i = 0; |
|00001d40| 69 20 3c 20 63 74 4d 61 | 72 6b 65 72 73 3b 20 20 |i < ctMa|rkers; |
|00001d50| 69 2b 2b 29 20 7b 0d 09 | 09 73 68 6f 72 74 20 6d |i++) {..|.short m|
|00001d60| 61 72 6b 65 72 4c 65 6e | 3b 0d 09 09 0d 09 09 61 |arkerLen|;......a|
|00001d70| 73 6d 20 7b 0d 09 09 09 | 6d 6f 76 65 2e 62 09 70 |sm {....|move.b.p|
|00001d80| 4d 61 72 6b 65 72 2d 3e | 6e 61 6d 65 2c 64 30 0d |Marker->|name,d0.|
|00001d90| 09 09 09 65 78 74 2e 77 | 09 64 30 0d 09 09 09 6d |...ext.w|.d0....m|
|00001da0| 6f 76 65 2e 77 09 64 30 | 2c 64 31 0d 09 09 09 61 |ove.w.d0|,d1....a|
|00001db0| 6e 64 69 2e 77 09 23 31 | 2c 64 30 0d 09 09 09 62 |ndi.w.#1|,d0....b|
|00001dc0| 6e 65 2e 73 09 40 64 6f | 6e 74 41 64 64 0d 09 09 |ne.s.@do|ntAdd...|
|00001dd0| 09 61 64 64 69 2e 77 09 | 23 31 2c 64 31 0d 09 09 |.addi.w.|#1,d1...|
|00001de0| 09 0d 09 09 40 64 6f 6e | 74 41 64 64 0d 09 09 09 |....@don|tAdd....|
|00001df0| 61 64 64 69 2e 77 09 23 | 39 2c 64 31 09 09 3b 20 |addi.w.#|9,d1..; |
|00001e00| 69 6e 63 6c 75 64 65 73 | 20 6c 65 6e 67 74 68 20 |includes| length |
|00001e10| 62 79 74 65 0d 09 09 09 | 0d 09 09 09 6d 6f 76 65 |byte....|....move|
|00001e20| 2e 77 09 64 31 2c 6d 61 | 72 6b 65 72 4c 65 6e 0d |.w.d1,ma|rkerLen.|
|00001e30| 09 09 7d 0d 09 09 0d 09 | 09 69 66 20 28 50 53 74 |..}.....|.if (PSt|
|00001e40| 72 45 71 75 61 6c 28 6e | 61 6d 65 2c 20 70 4d 61 |rEqual(n|ame, pMa|
|00001e50| 72 6b 65 72 2d 3e 6e 61 | 6d 65 29 29 20 7b 0d 09 |rker->na|me)) {..|
|00001e60| 09 09 6c 6f 6e 67 20 6f | 66 66 73 65 74 20 3d 20 |..long o|ffset = |
|00001e70| 28 28 63 68 61 72 2a 29 | 20 70 4d 61 72 6b 65 72 |((char*)| pMarker|
|00001e80| 20 2d 20 28 63 68 61 72 | 2a 29 20 2a 6d 61 72 6b | - (char|*) *mark|
|00001e90| 65 72 48 61 6e 64 6c 65 | 29 3b 0d 09 09 09 4d 75 |erHandle|);....Mu|
|00001ea0| 6e 67 65 72 28 6d 61 72 | 6b 65 72 48 61 6e 64 6c |nger(mar|kerHandl|
|00001eb0| 65 2c 20 6f 66 66 73 65 | 74 2c 20 6e 69 6c 2c 20 |e, offse|t, nil, |
|00001ec0| 6d 61 72 6b 65 72 4c 65 | 6e 2c 20 28 50 74 72 29 |markerLe|n, (Ptr)|
|00001ed0| 20 2d 31 2c 20 30 29 3b | 0d 09 09 09 2d 2d 28 2a | -1, 0);|....--(*|
|00001ee0| 2a 28 73 68 6f 72 74 2a | 2a 29 20 6d 61 72 6b 65 |*(short*|*) marke|
|00001ef0| 72 48 61 6e 64 6c 65 29 | 3b 0d 09 09 09 4d 61 6b |rHandle)|;....Mak|
|00001f00| 65 4d 61 72 6b 65 72 73 | 44 69 72 74 79 28 29 3b |eMarkers|Dirty();|
|00001f10| 0d 09 09 09 72 65 74 75 | 72 6e 3b 0d 09 09 7d 0d |....retu|rn;...}.|
|00001f20| 0d 09 09 61 73 6d 20 7b | 0d 09 09 09 61 64 64 2e |...asm {|....add.|
|00001f30| 77 09 6d 61 72 6b 65 72 | 4c 65 6e 2c 70 4d 61 72 |w.marker|Len,pMar|
|00001f40| 6b 65 72 0d 09 09 7d 0d | 09 7d 0d 0d 09 61 73 6d |ker...}.|.}...asm|
|00001f50| 20 7b 0d 09 40 6e 6f 67 | 6f 6f 64 0d 09 7d 0d 7d | {..@nog|ood..}.}|
|00001f60| 0d 0d 76 6f 69 64 20 50 | 55 46 4d 61 72 6b 53 65 |..void P|UFMarkSe|
|00001f70| 6c 65 63 74 69 6f 6e 28 | 53 74 72 32 35 35 20 6d |lection(|Str255 m|
|00001f80| 61 72 6b 65 72 4e 61 6d | 65 29 0d 7b 0d 09 48 61 |arkerNam|e).{..Ha|
|00001f90| 6e 64 6c 65 20 6d 61 72 | 6b 65 72 48 61 6e 64 6c |ndle mar|kerHandl|
|00001fa0| 65 3b 0d 09 6c 6f 6e 67 | 20 73 65 6c 53 74 61 72 |e;..long| selStar|
|00001fb0| 74 2c 20 73 65 6c 45 6e | 64 3b 0d 09 42 6f 6f 6c |t, selEn|d;..Bool|
|00001fc0| 65 61 6e 20 6e 65 65 64 | 52 65 70 6c 61 63 65 20 |ean need|Replace |
|00001fd0| 3d 20 66 61 6c 73 65 3b | 0d 0d 09 2f 2f 20 69 66 |= false;|...// if|
|00001fe0| 20 61 20 6d 61 72 6b 65 | 72 20 62 79 20 74 68 61 | a marke|r by tha|
|00001ff0| 74 20 6e 61 6d 65 20 65 | 78 69 73 74 73 2c 20 64 |t name e|xists, d|
|00002000| 65 6c 65 74 65 20 69 74 | 2e 0d 09 50 55 46 44 65 |elete it|...PUFDe|
|00002010| 6c 65 74 65 4d 61 72 6b | 65 72 28 6d 61 72 6b 65 |leteMark|er(marke|
|00002020| 72 4e 61 6d 65 29 3b 0d | 0d 09 2f 2f 20 67 65 74 |rName);.|..// get|
|00002030| 20 74 68 65 20 6d 61 72 | 6b 65 72 20 68 61 6e 64 | the mar|ker hand|
|00002040| 6c 65 0d 09 61 73 6d 20 | 7b 0d 09 09 63 6c 72 2e |le..asm |{...clr.|
|00002050| 6c 09 2d 28 73 70 29 0d | 09 09 5f 46 72 6f 6e 74 |l.-(sp).|.._Front|
|00002060| 57 69 6e 64 6f 77 0d 09 | 09 6d 6f 76 65 2e 6c 09 |Window..|.move.l.|
|00002070| 28 73 70 29 2b 2c 64 30 | 0d 09 09 62 65 71 09 09 |(sp)+,d0|...beq..|
|00002080| 40 6e 6f 67 6f 6f 64 09 | 09 09 3b 20 69 73 20 74 |@nogood.|..; is t|
|00002090| 68 65 72 65 20 61 20 66 | 72 6f 6e 74 20 77 69 6e |here a f|ront win|
|000020a0| 64 6f 77 0d 09 09 6d 6f | 76 65 2e 6c 09 64 30 2c |dow...mo|ve.l.d0,|
|000020b0| 61 30 0d 09 09 0d 09 09 | 6d 6f 76 65 2e 6c 09 30 |a0......|move.l.0|
|000020c0| 78 39 38 28 61 30 29 2c | 64 30 09 09 3b 20 30 78 |x98(a0),|d0..; 0x|
|000020d0| 39 38 20 69 73 20 74 68 | 65 20 72 65 66 63 6f 6e |98 is th|e refcon|
|000020e0| 0d 09 09 62 65 71 09 09 | 40 6e 6f 67 6f 6f 64 0d |...beq..|@nogood.|
|000020f0| 09 09 0d 09 09 6d 6f 76 | 65 2e 6c 09 30 78 33 30 |.....mov|e.l.0x30|
|00002100| 34 28 61 30 29 2c 6d 61 | 72 6b 65 72 48 61 6e 64 |4(a0),ma|rkerHand|
|00002110| 6c 65 09 3b 20 70 72 69 | 76 61 74 65 20 64 61 74 |le.; pri|vate dat|
|00002120| 61 20 66 6f 72 20 74 68 | 65 20 6d 61 72 6b 65 72 |a for th|e marker|
|00002130| 73 0d 09 7d 0d 0d 09 50 | 55 46 47 65 74 53 65 6c |s..}...P|UFGetSel|
|00002140| 65 63 74 69 6f 6e 28 26 | 73 65 6c 53 74 61 72 74 |ection(&|selStart|
|00002150| 2c 20 26 73 65 6c 45 6e | 64 29 3b 0d 0d 09 69 66 |, &selEn|d);...if|
|00002160| 20 28 6d 61 72 6b 65 72 | 48 61 6e 64 6c 65 20 3d | (marker|Handle =|
|00002170| 3d 20 6e 69 6c 29 20 7b | 0d 09 09 6d 61 72 6b 65 |= nil) {|...marke|
|00002180| 72 48 61 6e 64 6c 65 20 | 3d 20 4e 65 77 48 61 6e |rHandle |= NewHan|
|00002190| 64 6c 65 43 6c 65 61 72 | 28 73 69 7a 65 6f 66 28 |dleClear|(sizeof(|
|000021a0| 73 68 6f 72 74 29 29 3b | 0d 09 09 46 61 69 6c 4e |short));|...FailN|
|000021b0| 69 6c 28 6d 61 72 6b 65 | 72 48 61 6e 64 6c 65 29 |il(marke|rHandle)|
|000021c0| 3b 0d 09 09 6e 65 65 64 | 52 65 70 6c 61 63 65 20 |;...need|Replace |
|000021d0| 3d 20 74 72 75 65 3b 0d | 09 7d 0d 09 0d 09 50 74 |= true;.|.}....Pt|
|000021e0| 72 41 6e 64 48 61 6e 64 | 28 26 73 65 6c 53 74 61 |rAndHand|(&selSta|
|000021f0| 72 74 2c 20 6d 61 72 6b | 65 72 48 61 6e 64 6c 65 |rt, mark|erHandle|
|00002200| 2c 20 73 69 7a 65 6f 66 | 28 6c 6f 6e 67 29 29 3b |, sizeof|(long));|
|00002210| 0d 09 50 74 72 41 6e 64 | 48 61 6e 64 28 26 73 65 |..PtrAnd|Hand(&se|
|00002220| 6c 45 6e 64 2c 20 6d 61 | 72 6b 65 72 48 61 6e 64 |lEnd, ma|rkerHand|
|00002230| 6c 65 2c 20 73 69 7a 65 | 6f 66 28 6c 6f 6e 67 29 |le, size|of(long)|
|00002240| 29 3b 0d 09 50 74 72 41 | 6e 64 48 61 6e 64 28 6d |);..PtrA|ndHand(m|
|00002250| 61 72 6b 65 72 4e 61 6d | 65 2c 20 6d 61 72 6b 65 |arkerNam|e, marke|
|00002260| 72 48 61 6e 64 6c 65 2c | 20 6d 61 72 6b 65 72 4e |rHandle,| markerN|
|00002270| 61 6d 65 5b 30 5d 20 2b | 20 28 28 6d 61 72 6b 65 |ame[0] +| ((marke|
|00002280| 72 4e 61 6d 65 5b 30 5d | 20 26 20 31 29 3f 20 31 |rName[0]| & 1)? 1|
|00002290| 20 3a 20 32 29 29 3b 0d | 0d 09 2b 2b 28 2a 2a 28 | : 2));.|..++(**(|
|000022a0| 73 68 6f 72 74 2a 2a 29 | 20 6d 61 72 6b 65 72 48 |short**)| markerH|
|000022b0| 61 6e 64 6c 65 29 3b 0d | 0d 09 69 66 20 28 6e 65 |andle);.|..if (ne|
|000022c0| 65 64 52 65 70 6c 61 63 | 65 29 0d 09 09 61 73 6d |edReplac|e)...asm|
|000022d0| 20 7b 0d 09 09 09 63 6c | 72 2e 6c 09 2d 28 73 70 | {....cl|r.l.-(sp|
|000022e0| 29 0d 09 09 09 5f 46 72 | 6f 6e 74 57 69 6e 64 6f |)...._Fr|ontWindo|
|000022f0| 77 0d 09 09 09 6d 6f 76 | 65 2e 6c 09 28 73 70 29 |w....mov|e.l.(sp)|
|00002300| 2b 2c 61 30 0d 09 09 09 | 6d 6f 76 65 2e 6c 09 6d |+,a0....|move.l.m|
|00002310| 61 72 6b 65 72 48 61 6e | 64 6c 65 2c 30 78 33 30 |arkerHan|dle,0x30|
|00002320| 34 28 61 30 29 0d 09 09 | 7d 0d 0d 09 4d 61 6b 65 |4(a0)...|}...Make|
|00002330| 4d 61 72 6b 65 72 73 44 | 69 72 74 79 28 29 3b 0d |MarkersD|irty();.|
|00002340| 0d 09 61 73 6d 20 7b 0d | 09 09 40 6e 6f 67 6f 6f |..asm {.|..@nogoo|
|00002350| 64 0d 09 7d 0d 7d 0d 0d | 73 74 61 74 69 63 20 73 |d..}.}..|static s|
|00002360| 68 6f 72 74 20 49 74 65 | 6d 49 6e 4d 65 6e 75 28 |hort Ite|mInMenu(|
|00002370| 53 74 72 32 35 35 20 73 | 65 61 72 63 68 42 75 66 |Str255 s|earchBuf|
|00002380| 66 65 72 2c 20 4d 65 6e | 75 48 61 6e 64 6c 65 20 |fer, Men|uHandle |
|00002390| 6d 29 0d 7b 0d 09 73 68 | 6f 72 74 20 63 74 49 74 |m).{..sh|ort ctIt|
|000023a0| 65 6d 73 20 3d 20 43 6f | 75 6e 74 4d 49 74 65 6d |ems = Co|untMItem|
|000023b0| 73 28 6d 29 3b 0d 09 73 | 68 6f 72 74 20 69 3b 0d |s(m);..s|hort i;.|
|000023c0| 09 0d 09 66 6f 72 20 28 | 69 20 3d 20 31 3b 20 20 |...for (|i = 1; |
|000023d0| 69 20 3c 3d 20 63 74 49 | 74 65 6d 73 3b 20 20 69 |i <= ctI|tems; i|
|000023e0| 2b 2b 29 20 7b 0d 09 09 | 53 74 72 32 35 35 20 73 |++) {...|Str255 s|
|000023f0| 3b 0d 09 09 47 65 74 49 | 74 65 6d 28 6d 2c 20 69 |;...GetI|tem(m, i|
|00002400| 2c 20 73 29 3b 0d 09 09 | 69 66 20 28 73 5b 30 5d |, s);...|if (s[0]|
|00002410| 20 3d 3d 20 73 65 61 72 | 63 68 42 75 66 66 65 72 | == sear|chBuffer|
|00002420| 5b 30 5d 29 0d 09 09 09 | 69 66 20 28 73 74 72 6e |[0])....|if (strn|
|00002430| 63 61 73 65 63 6d 70 28 | 28 63 6f 6e 73 74 20 63 |casecmp(|(const c|
|00002440| 68 61 72 2a 29 20 26 73 | 5b 31 5d 2c 20 28 63 6f |har*) &s|[1], (co|
|00002450| 6e 73 74 20 63 68 61 72 | 2a 29 20 26 73 65 61 72 |nst char|*) &sear|
|00002460| 63 68 42 75 66 66 65 72 | 5b 31 5d 2c 20 73 5b 30 |chBuffer|[1], s[0|
|00002470| 5d 29 20 3d 3d 20 30 29 | 20 7b 0d 09 09 09 09 2f |]) == 0)| {...../|
|00002480| 2f 20 66 6f 75 6e 64 20 | 69 74 2c 20 62 75 74 20 |/ found |it, but |
|00002490| 6f 6e 6c 79 20 72 65 74 | 75 72 6e 20 69 74 20 69 |only ret|urn it i|
|000024a0| 66 20 69 74 27 73 20 65 | 6e 61 62 6c 65 64 0d 09 |f it's e|nabled..|
|000024b0| 09 09 09 69 66 20 28 28 | 28 2a 2a 6d 29 2e 65 6e |...if ((|(**m).en|
|000024c0| 61 62 6c 65 46 6c 61 67 | 73 20 26 20 28 31 20 3c |ableFlag|s & (1 <|
|000024d0| 3c 20 69 29 29 20 3d 3d | 20 30 29 0d 09 09 09 09 |< i)) ==| 0).....|
|000024e0| 09 72 65 74 75 72 6e 20 | 30 3b 09 2f 2f 20 6e 6f |.return |0;.// no|
|000024f0| 74 20 65 6e 61 62 6c 65 | 64 c9 0d 09 09 09 09 65 |t enable|d......e|
|00002500| 6c 73 65 0d 09 09 09 09 | 09 72 65 74 75 72 6e 20 |lse.....|.return |
|00002510| 69 3b 0d 09 09 09 7d 0d | 09 09 7d 0d 09 09 09 0d |i;....}.|..}.....|
|00002520| 09 72 65 74 75 72 6e 20 | 30 3b 0d 7d 0d 0d 76 6f |.return |0;.}..vo|
|00002530| 69 64 20 50 55 46 43 61 | 6c 6c 4d 65 6e 75 28 53 |id PUFCa|llMenu(S|
|00002540| 74 72 32 35 35 20 69 74 | 65 6d 4e 61 6d 65 29 0d |tr255 it|emName).|
|00002550| 7b 0d 09 2f 2f 20 66 69 | 6e 64 20 74 68 65 20 6d |{..// fi|nd the m|
|00002560| 65 6e 75 20 6e 61 6d 65 | 20 61 6d 6f 6e 67 20 74 |enu name| among t|
|00002570| 68 65 20 6d 65 6e 75 73 | 20 69 6e 20 74 68 65 20 |he menus| in the |
|00002580| 6d 65 6e 75 62 61 72 0d | 09 4d 65 6e 75 73 4c 69 |menubar.|.MenusLi|
|00002590| 73 74 2a 20 6d 65 6e 75 | 73 20 3d 20 2a 74 68 65 |st* menu|s = *the|
|000025a0| 4d 65 6e 75 73 3b 0d 09 | 73 68 6f 72 74 20 69 2c |Menus;..|short i,|
|000025b0| 20 6d 65 6e 75 43 6f 75 | 6e 74 20 3d 20 6d 65 6e | menuCou|nt = men|
|000025c0| 75 73 2d 3e 69 74 65 6d | 73 4f 66 66 73 65 74 20 |us->item|sOffset |
|000025d0| 2f 20 73 69 7a 65 6f 66 | 28 4d 65 6e 75 45 6c 65 |/ sizeof|(MenuEle|
|000025e0| 6d 65 6e 74 29 3b 0d 09 | 09 0d 09 66 6f 72 20 28 |ment);..|...for (|
|000025f0| 69 20 3d 20 30 3b 20 69 | 20 3c 20 6d 65 6e 75 43 |i = 0; i| < menuC|
|00002600| 6f 75 6e 74 3b 20 2b 2b | 69 29 20 7b 0d 09 09 4d |ount; ++|i) {...M|
|00002610| 65 6e 75 48 61 6e 64 6c | 65 20 6d 20 3d 20 6d 65 |enuHandl|e m = me|
|00002620| 6e 75 73 2d 3e 65 6c 65 | 6d 65 6e 74 73 5b 69 5d |nus->ele|ments[i]|
|00002630| 2e 6d 65 6e 75 3b 0d 09 | 09 0d 09 09 2f 2f 20 69 |.menu;..|....// i|
|00002640| 74 65 6d 20 65 78 69 73 | 74 73 20 68 65 72 65 3f |tem exis|ts here?|
|00002650| 0d 09 09 73 68 6f 72 74 | 20 69 74 65 6d 20 3d 20 |...short| item = |
|00002660| 49 74 65 6d 49 6e 4d 65 | 6e 75 28 69 74 65 6d 4e |ItemInMe|nu(itemN|
|00002670| 61 6d 65 2c 20 6d 29 3b | 0d 09 09 69 66 20 28 69 |ame, m);|...if (i|
|00002680| 74 65 6d 20 3e 20 30 29 | 20 7b 20 2f 2f 20 66 6f |tem > 0)| { // fo|
|00002690| 75 6e 64 20 69 74 21 0d | 09 09 09 6c 6f 6e 67 20 |und it!.|...long |
|000026a0| 70 61 72 61 6d 20 3d 20 | 28 28 6c 6f 6e 67 29 20 |param = |((long) |
|000026b0| 28 2a 2a 6d 29 2e 6d 65 | 6e 75 49 44 20 3c 3c 20 |(**m).me|nuID << |
|000026c0| 31 36 29 20 7c 20 28 6c | 6f 6e 67 29 20 69 74 65 |16) | (l|ong) ite|
|000026d0| 6d 3b 0d 09 09 09 53 65 | 6c 65 63 74 4d 65 6e 75 |m;....Se|lectMenu|
|000026e0| 49 74 65 6d 28 70 61 72 | 61 6d 29 3b 0d 09 09 09 |Item(par|am);....|
|000026f0| 72 65 74 75 72 6e 3b 0d | 09 09 7d 0d 09 7d 0d 7d |return;.|..}..}.}|
|00002700| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 46 |.......L|...L...F|
|00002710| 00 09 0a ff ff 00 00 00 | 0d 00 00 00 00 09 24 ff |........|......$.|
|00002720| ff 00 00 00 0e 00 00 00 | 00 09 28 ff ff 00 00 00 |........|..(.....|
|00002730| 0e 50 55 46 49 6e 74 65 | 72 66 61 63 65 2e 63 50 |.PUFInte|rface.cP|
|00002740| 02 00 00 43 54 45 58 54 | 4b 41 48 4c 01 00 00 00 |...CTEXT|KAHL....|
|00002750| 00 43 54 45 58 54 4b 41 | 48 4c 01 00 00 00 00 00 |.CTEXTKA|HL......|
|00002760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002770| 41 52 a8 1b e2 ca 00 00 | 26 80 00 00 01 92 8a ff |AR......|&.......|
|00002780| ff 00 00 00 0e 00 00 00 | 00 09 8e ff ff 00 00 00 |........|........|
|00002790| 0d 00 00 00 00 09 a2 ff | ff 00 00 00 0e 00 00 00 |........|........|
|000027a0| 00 09 a6 ff ff 00 00 00 | 0e 00 05 00 00 00 26 ff |........|......&.|
|000027b0| ff 00 00 00 0e 00 05 00 | 00 00 2a ff ff 00 00 00 |........|..*.....|
|000027c0| 0d 00 05 00 00 00 3c ff | ff 00 00 00 0d 00 05 00 |......<.|........|
|000027d0| 00 00 46 ff ff 00 00 00 | 0d 00 05 00 00 00 84 ff |..F.....|........|
|000027e0| ff 00 00 00 0e 00 05 00 | 00 00 88 ff ff 00 00 00 |........|........|
|000027f0| 0d 00 05 00 00 00 c4 ff | ff 00 00 00 0e 00 05 00 |........|........|
|00002800| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00002810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002820| 00 00 00 00 00 00 00 06 | 00 04 00 4e 04 16 03 74 |........|...N...t|
|00002830| 06 7e 00 4e 04 16 03 74 | 06 7e a8 97 f2 26 00 00 |.~.N...t|.~...&..|
|00002840| 26 80 00 00 26 80 00 00 | 00 00 01 00 00 00 01 00 |&...&...|........|
|00002850| 00 00 01 4c 00 00 00 4c | 00 00 00 46 00 74 30 c4 |...L...L|...F.t0.|
|00002860| 11 a2 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|00002870| 00 0a 03 ed 00 00 00 00 | 00 00 00 74 2f dc 13 43 |........|...t/..C|
|00002880| 72 65 61 74 65 64 20 62 | 79 20 43 4d 61 73 74 65 |reated b|y CMaste|
|00002890| 72 aa 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |r.......|........|
|000028a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+